import Vue from 'vue'
import Router from 'vue-router'
import routers from '~/routers/routers'

//路由配置
Vue.use(Router)
const router = new Router({
  routes: routers,
  mode: 'hash'
})
router.beforeEach((to, from, next) => {
  this.$openLoading
  next();
});
router.afterEach(to => {
    this.$hideLoading
  // window.scrollTo(0, 0)
})

export default router
